<div class="modal fade" id="updataModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <form method="post" action="{:url('ClubAdmin/LessonsController/update')}" enctype="multipart/form-data">

            <div class="modal-content">
                <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">更新</h4>
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    
                </div>

               <div class="modal-body">

                    <div class="form-group">
                        <label for="name">课程名</label>
                        <input type="text" class="form-control" name="lname" placeholder="课程名" id="lname">
                    </div>

                    <div class="form-group">
                        <label for="name">课程介绍</label>
                        <input type="text" class="form-control" name="lintro" placeholder="课程介绍" id="lintro">
                    </div>

                     
                     <div class="form-group">
                        <label for="name">价格</label>
                        <input type="text" class="form-control" name="lprice" placeholder="价格" id="lprice">
                    </div>
                    
                  <input type="hidden" name="lid" value="" id="hidden2" >
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">确认修改</button>
                </div>

            </div><!-- /.modal-content -->
        </form>
    </div><!-- /.modal -->
</div>
<script type="text/javascript">
        function jsedit(lid)
        {
            //console.log(aid);
           $.ajax({
            url:"{:url('lessons_controller/edit')}",
            data:{
                "lid":lid
            },
            dataType:'json',
            success(data){
               console.log(data);
          $("#lname").val(data.lname);
console.log(data.lname);
          $("#lintro").val(data.lintro);

          $("#lprice").val(data.lprice);

          $("#hidden2").val(data.lid);

      
            }
        }); 
        }

    </script>